<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1{
            color: aquamarine;
        }
    </style>
</head>
<body>
    <h1>兔子太多吃不完</h1>
    <script>
        //兔子斐波那契
var a = 1;
var b = 1;

//公式 c = a + b
var c = 0;
for (var i = 3; i <= 8; i++) {
    //求完之后,下一个月的结果c依旧是a+b
    c = a + b;
    //a和b变量交换
    a = b;
    //c和b的变量进行交换
    b = c;
}
console.log(c);
    </script>
</body>
</html>